import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);//安装插件

import Film from '../pages/film.vue'
import Cinema from '../pages/cinema.vue'
import Information from '../pages/information.vue'
import Cuser from '../pages/user.vue'
import Will from '../components/will.vue'
import Now from '../components/now'
import C_erro from '../pages/erro'
import Mape from '../pages/map'
import Reg from '../pages/reg'
import Longin from '../pages/longin'
import Dtls from '../components/details'
let routes = [
    { path: "/", component: Film },
    {
        path: '/film', component: Film
    },
    {
        path: '/cinema', component: Cinema
    },
    {
        path: '/information', component: Information
    }, {
        path: '/user', component: Cuser
    }, {
        path: '/will', component: Will
    }, {
        path: '/now', component: Now
    },
    {
        path:'/map',component: Mape
    },
    {
        path:'/reg',component:Reg
    },
    {
        path:'/longin',component: Longin
    },
    {
        path:'/detail/:id',component:Dtls,name:'detail'
    },
    {
        path: '/*' ,component :C_erro
    }
]
let router = new VueRouter({
    routes,
    mode: 'history'
});
export default router